package com.myproject.mall.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.myproject.mall.domain.enums.ShopStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@TableName("scmall_shop")
@Schema(description = "店铺信息")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Shop {
    @Schema(description = "店铺ID")
    @TableId(value = "shop_id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "店铺索有人")
    @TableField(value = "shop_user_id")
    private String userId;

    @Schema(description = "店铺名称")
    @TableField(value = "shop_title")
    private String title;

    @Schema(description = "店铺描述")
    @TableField(value = "shop_description")
    private String description;

    @Schema(description = "店铺状态")
    @TableField(value = "shop_status")
    private ShopStatus status;

    @Schema(description = "店铺海报")
    @TableField(value = "shop_poster")
    private String poster;

    @Schema(description = "店铺地址")
    @TableField(value = "shop_address")
    private String address;

    @Schema(description = "店铺关注数")
    @TableField(value = "shop_fans")
    private Integer fans;

    @Schema(description = "店铺创建时间")
    @TableField(value = "shop_create_time")
    private LocalDateTime createTime;

    @Schema(description = "店铺更新时间")
    @TableField(value = "shop_update_time")
    private LocalDateTime updateTime;
}
